<?php

namespace addons\exam\controller;

use app\admin\model\exam\PaperModel;
use app\admin\model\Markimage;
use think\addons\Controller;
use think\Config;

class Index extends Base
{

    protected $noNeedLogin = ['*'];
    protected $noNeedRight = ['*'];
    public function index()
    {
        $this->error("当前插件暂无前台页面");
    }

    public function config(){
        $site = Config::get("site");
        $this->success('ok',$site);
    }


    public function markimage(){
        $ids = input('ids');
        if(!$ids){
            $this->error('缺少参数');
        }
        $model = new PaperModel();
        $data = $model->where(['id'=>$ids])->field('id,basic')->find();
        $data['basic'] = json_decode($data['basic'],true);
        $this->success('ok',$data);
    }

}
